﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Contracts;
using System.ServiceModel;
using WcfContrib.Errors;
using WcfContrib.Extensions.Context;

namespace Showcase.Service
{
    [ServiceBehavior(ConfigurationName = "MyService")]
    class Service : IService
    {
        static int counter;

        #region IService Members

        public Foo GetFoo(Foo[] foos)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("Service: GetFoo() [call count: " + counter + "]");

            foos[0].Id = counter++;

            return foos[0];
        }

        #endregion
    }
}
